class Role < ActiveRecord::Base
  has_many :assignments
  has_many :users, :through => :assignments

  #Named Scopes
  named_scope :admin_role, :conditions => ["name = ?", "admin"]
  named_scope :user_role, :conditions => ["name = ?", "user"]
  named_scope :moderator_role, :conditions => ["name = ?", "moderator"]
end
